// Package
/**
 * @author: byz08
 * @description:
 * @file: main
 * @version: 1.0.0
 * @date: 2022/6/8 8:55
 */
package main

import (
	"flag"
	"fmt"
)

var serverIp string
var serverPort int

// init
// @Description: 初始化命令行参数
func init() {
	flag.StringVar(&serverIp, "ip", "127.0.0.1", "默认服务地址为:127.0.0.1")
	flag.IntVar(&serverPort, "port", 8888, "默认端口号为:8888")
}

func main() {
	flag.Parse()
	fmt.Printf("start Server main in %s:%d!\n", serverIp, serverPort)
	server := NewServer(serverIp, serverPort)
	server.Start()
}
